<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
		<html>
		<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		<title>Sequence</title>
		<META HTTP-EQUIV="EXPIRES" CONTENT=0>
		<link rel="stylesheet" href="../../../../docs.css">
		</head>
		<body>
		
<br>
<h1>Io Reference</h1>
<br><br><br>
<br><br><br>
<a class='column' href='../../index.html'>Core</a>
&nbsp;&nbsp;<font color=#ccc>/</font>&nbsp;&nbsp;
<a class='column' href='../index.html'>Core</a>
&nbsp;&nbsp;<font color=#ccc>/</font>&nbsp;&nbsp;
<b>Sequence</b>
<br><br><br>
<br><br><br>
<table border=0 cellspacing=0 style="margin-left:8em; width:40em; line-height:1.2em;">
<tr>
<td align=right></td>
<td></td>
<td>A Sequence is a container for a list of data elements. Typically these elements are each 1 byte in size. A Sequence can be either mutable or immutable. When immutable, only the read-only methods can be used.
<p>
Terminology
<ul>
<li> Buffer: A mutable Sequence of single byte elements, typically in a binary encoding
<li> Symbol or String: A unique immutable Sequence, typically in a character encoding
</ul>
</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr>
<td align=right>
</td>
<td></td>
<td>
<hr align=left color=#ddd height=1>
<br><br>
<a name="Sequence-*"></a><b>
*(aSeq)
</b>
<p>
<div class=slotDescription>
Multiplies the values of aSeq to the corresponding values of the receiver 
	returning a new vector with the result.
	Only works on Sequences whose item type is numeric.
</div>
<a name="Sequence-**"></a><b>
**(aSeq)
</b>
<p>
<div class=slotDescription>
Raises the values of the receiver in the corresponding values of aSeq 
	returning a new vector with the result.
	Only works on Sequences whose item type is numeric.
</div>
<a name="Sequence-**="></a><b>
**=(aSeq)
</b>
<p>
<div class=slotDescription>
Raises the values of the receiver in the corresponding values of aSeq.
	Only works on Sequences whose item type is numeric. Returns self.
</div>
<a name="Sequence-*="></a><b>
*=(aSeq)
</b>
<p>
<div class=slotDescription>
Multiplies the values of aSeq to the corresponding values of the receiver.
	Only works on Sequences whose item type is numeric. Returns self.
</div>
<a name="Sequence-+"></a><b>
+(aSeq)
</b>
<p>
<div class=slotDescription>
Vector addition - adds the values of aSeq to the corresponding values of the receiver
	returning a new vector with the result.
	Only works on Sequences whose item type is numeric.
</div>
<a name="Sequence-+="></a><b>
+=(aSeq)
</b>
<p>
<div class=slotDescription>
Vector addition - adds the values of aSeq to those of the receiver.
	Only works on Sequences whose item type is numeric. Returns self.
</div>
<a name="Sequence--"></a><b>
-(aSeq)
</b>
<p>
<div class=slotDescription>
Vector subtraction - Subtracts the values of aSeq from the corresponding values of the receiver 
	returning a new vector with the result.
	Only works on Sequences whose item type is numeric.
</div>
<a name="Sequence--="></a><b>
-=(aSeq)
</b>
<p>
<div class=slotDescription>
Vector subtraction - subtracts the values of aSeq to those of the receiver.
	Only works on Sequences whose item type is numeric. Returns self.
</div>
<a name="Sequence-.."></a><b>
..(aSequence)
</b>
<p>
<div class=slotDescription>
Returns a copy of the receiver with aSequence appended to it.
</div>
<a name="Sequence-/"></a><b>
/(aSeq)
</b>
<p>
<div class=slotDescription>
Divides the values of the receiver by the corresponding values of aSeq 
	returning a new vector with the result.
	Only works on Sequences whose item type is numeric.
</div>
<a name="Sequence-/="></a><b>
/=(aSeq)
</b>
<p>
<div class=slotDescription>
Divides the values of aSeq to the corresponding values of the receiver.
	Only works on Sequences whose item type is numeric. Returns self.
</div>
<a name="Sequence-Max"></a><b>
Max
</b>
<p>
<div class=slotDescription>
Returns the maximum value in the sequence.
</div>
<a name="Sequence-Min"></a><b>
Min
</b>
<p>
<div class=slotDescription>
Returns the minimum value in the sequence.
</div>
<a name="Sequence-abs"></a><b>
abs
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to its absolute value.
Returns self.
</div>
<a name="Sequence-acos"></a><b>
acos
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the trigonometric arcsine of its value.
Returns self.
</div>
<a name="Sequence-afterSeq"></a><b>
afterSeq(aSequence)
</b>
<p>
<div class=slotDescription>
Returns the slice of the receiver (as a Symbol) after aSequence or
	nil if aSequence is not found. If aSequence is empty, the receiver
	(or a copy of the receiver if it is mutable) is returned.
</div>
<a name="Sequence-alignCenter"></a><b>
alignCenter(width, [padding]) ""
</b>
<p>
<div class=slotDescription>
Example:
	<code>
	Io> "abc" alignCenter(10, "-")
	==> ---abc----
	Io> "abc" alignCenter(10, "-=")
	==> -=-abc-=-=
	</code>
</div>
<a name="Sequence-alignLeft"></a><b>
alignLeft(width, [padding])
</b>
<p>
<div class=slotDescription>
Example:
	<p>
	<code>
	Io> "abc" alignLeft(10, "+")
	==> abc+++++++
	Io> "abc" alignLeft(10, "-=")
	==> abc-=-=-=-
	</code>
</div>
<a name="Sequence-alignLeftInPlace"></a><b>
alignLeftInPlace(width, [padding])
</b>
<p>
<div class=slotDescription>
Same as align left but operation is performed on the receiver.
</div>
<a name="Sequence-alignRight"></a><b>
alignRight(width, [padding])
</b>
<p>
<div class=slotDescription>
Example:
	<p>
	<code>
	Io> "abc" alignRight(10, "-")
	==> -------abc
	Io> "abc" alignRight(10, "-=")
	==> -=-=-=-abc
	</code>
</div>
<a name="Sequence-allMatchesOfRegex"></a><b>
allMatchesOfRegex(aRegexOrString)
</b>
<p>
<div class=slotDescription>
Returns a List containing all matches of the given regex found in the receiver.
</div>
<a name="Sequence-append"></a><b>
append(aNumber)
</b>
<p>
<div class=slotDescription>
Appends aNumber (cast to a byte) to the receiver. Returns self.
</div>
<a name="Sequence-appendPathSeq"></a><b>
appendPathSeq(aSeq)
</b>
<p>
<div class=slotDescription>
Appends argument to the receiver such that there is one
	and only one path separator between the two. Returns self.
</div>
<a name="Sequence-appendSeq"></a><b>
appendSeq(object1, object2, ...)
</b>
<p>
<div class=slotDescription>
Calls asString on the arguments and appends the string to the receiver. Returns self.
</div>
<a name="Sequence-asBase64"></a><b>
asBase64(optionalCharactersPerLine)
</b>
<p>
<div class=slotDescription>
Returns an immutable, base64 encoded (according to RFC 1421) version of self. 
	optionalCharactersPerLine describes the number of characters between line breaks and defaults to 0.
</div>
<a name="Sequence-asBinaryNumber"></a><b>
asBinaryNumber
</b>
<p>
<div class=slotDescription>
Returns a Number containing the first 8 bytes of the
	receiver without casting them to a double. Endian is same as machine.
</div>
<a name="Sequence-asBinarySignedInteger"></a><b>
asBinarySignedInteger
</b>
<p>
<div class=slotDescription>
Returns a Number with the bytes of the receiver interpreted as a binary signed integer. Endian is same as machine.
</div>
<a name="Sequence-asBinaryUnsignedInteger"></a><b>
asBinaryUnsignedInteger
</b>
<p>
<div class=slotDescription>
Returns a Number with the bytes of the receiver interpreted as a binary unsigned integer. Endian is same as machine.
</div>
<a name="Sequence-asCapitalized"></a><b>
asCapitalized
</b>
<p>
<div class=slotDescription>
Returns a copy of the receiver with the first charater made uppercase.
</div>
<a name="Sequence-asClutterColor"></a><b>
asClutterColor
</b>
<p>
<div class=slotDescription>
Calls [[ClutterColor with]] with self as an argument.
</div>
<a name="Sequence-asClutterUnit"></a><b>
asClutterUnit
</b>
<p>
<div class=slotDescription>
Calls [[ClutterUnit withString]].
</div>
<a name="Sequence-asFile"></a><b>
asFile
</b>
<p>
<div class=slotDescription>
Returns a new File object with the receiver as its path.
</div>
<a name="Sequence-asFixedSizeType"></a><b>
asFixedSizeType
</b>
<p>
<div class=slotDescription>
Returns a new sequence with the receiver encoded in the 
	minimal fixed width text encoding that its characters can fit 
	into (either, ascii, utf8, utf16 or utf32).
</div>
<a name="Sequence-asHTML"></a><b>
asHTML
</b>
<p>
<div class=slotDescription>
SGML extension to interpret the Sequence as HTML and return an SGML object using SGMLParser elementForString
</div>
<a name="Sequence-asHex"></a><b>
asHex
</b>
<p>
<div class=slotDescription>
Returns a hex string for the receiving sequence, e.g., \"abc\" asHex -> \"616263\".")
</div>
<a name="Sequence-asIoPath"></a><b>
asIoPath
</b>
<p>
<div class=slotDescription>
Returns a Io style path for an OS style path.
</div>
<a name="Sequence-asJid"></a><b>
asJid
</b>
<p>
<div class=slotDescription>
Converts Sequence to JID object. <pre><code>"cow@moo.com/Scandinavia" asJid</code></pre>
</div>
<a name="Sequence-asJson"></a><b>
asJson
</b>
<p>
<div class=slotDescription>
Converts to form that could be interpreted as json if it already contains json, e.g. {"aaa":"bbb"} --> "{\"aaa\":\"bbb\"}"
</div>
<a name="Sequence-asList"></a><b>
asList
</b>
<p>
<div class=slotDescription>
Returns the receiver converted to a List containing all elements of the Sequence.
</div>
<a name="Sequence-asLowercase"></a><b>
asLowercase
</b>
<p>
<div class=slotDescription>
Returns a symbol containing the reveiver made lowercase.
</div>
<a name="Sequence-asMessage"></a><b>
asMessage(optionalLabel)
</b>
<p>
<div class=slotDescription>
Returns the compiled message object for the string.
</div>
<a name="Sequence-asMutable"></a><b>
asMutable
</b>
<p>
<div class=slotDescription>
Returns a mutable copy of the receiver.
</div>
<a name="Sequence-asNumber"></a><b>
asNumber
</b>
<p>
<div class=slotDescription>
Returns the receiver converted to a number.
	Initial whitespace is ignored.
</div>
<a name="Sequence-asOSPath"></a><b>
asOSPath
</b>
<p>
<div class=slotDescription>
Returns a OS style path for an Io style path.
</div>
<a name="Sequence-asRegex"></a><b>
asRegex
</b>
<p>
<div class=slotDescription>
Returns a new Regex created from the receiver.
</div>
<a name="Sequence-asSGML"></a><b>
asSGML
</b>
<p>
<div class=slotDescription>
SGML extension to interpret the Sequence as SGML and return an SGML object using SGMLParser elementForString
</div>
<a name="Sequence-asStruct"></a><b>
asStruct(memberList)
</b>
<p>
<div class=slotDescription>
For a sequence that contains the data for a raw memory data structure (as used in C),
this method can be used to extract its members into an Object. The memberList argument
specifies the layout of the datastructure. Its form is:
<p>
list(memberType1, memberName1, memberType2, memberName2, ...)
<p>
Member types include: 
<pre>
int8, int16, int32, int64
uint8, uint16, uint32, uint64
float32, float64 
</pre>
Example:
<pre>
pointObject := structPointSeq asStruct(list("float32", "x", "float32", "y"))
</pre>
The output pointObject would contain x and y slots with Number objects.
</div>
<a name="Sequence-asSymbol"></a><b>
asSymbol
</b>
<p>
<div class=slotDescription>
Returns a immutable Sequence (aka Symbol) version of the receiver.
</div>
<a name="Sequence-asUCS2"></a><b>
asUCS2
</b>
<p>
<div class=slotDescription>
Returns a new copy of the receiver converted to UCS2 (fixed character width UTF16) encoding.
</div>
<a name="Sequence-asUCS4"></a><b>
asUCS4
</b>
<p>
<div class=slotDescription>
Returns a new copy of the receiver converted to UCS4 (fixed character width UTF32) encoding.
</div>
<a name="Sequence-asURL"></a><b>
asURL
</b>
<p>
<div class=slotDescription>
Returns a new URL object instance with the receiver as its url string.
</div>
<a name="Sequence-asUTF8"></a><b>
asUTF8
</b>
<p>
<div class=slotDescription>
Returns a new copy of the receiver converted to utf8 encoding.
</div>
<a name="Sequence-asUppercase"></a><b>
asUppercase
</b>
<p>
<div class=slotDescription>
Returns a symbol containing the reveiver made uppercase.
</div>
<a name="Sequence-asUrl"></a><b>
asUrl
</b>
<p>
<div class=slotDescription>
Shortcut for HCUrl with(aUrlSeq)
</div>
<a name="Sequence-asXML"></a><b>
asXML
</b>
<p>
<div class=slotDescription>
SGML extension to interpret the Sequence as XML and return an SGML object using SGMLParser elementForString
</div>
<a name="Sequence-asin"></a><b>
asin
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the trigonometric arcsine of its value.
Returns self.
</div>
<a name="Sequence-at"></a><b>
at(aNumber)
</b>
<p>
<div class=slotDescription>
Returns a value at the index specified by aNumber.
	Returns nil if the index is out of bounds.
</div>
<a name="Sequence-atInsertSeq"></a><b>
atInsertSeq(indexNumber, object)
</b>
<p>
<div class=slotDescription>
Calls asString on object and inserts the string at position indexNumber. Returns self.
</div>
<a name="Sequence-atPut"></a><b>
atPut(aNumberIndex, aNumber)
</b>
<p>
<div class=slotDescription>
Sets the value at the index specified by aNumberIndex to aNumber. Returns self.
</div>
<a name="Sequence-atan"></a><b>
atan
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the trigonometric arctangent of its value.
Returns self.
</div>
<a name="Sequence-beforeSeq"></a><b>
beforeSeq(aSequence)
</b>
<p>
<div class=slotDescription>
Returns the slice of the receiver (as a Symbol) before
	aSequence or self if aSequence is not found.
</div>
<a name="Sequence-beginsWithSeq"></a><b>
beginsWithSeq(aSequence)
</b>
<p>
<div class=slotDescription>
Returns true if the receiver begins with aSequence, false otherwise.
</div>
<a name="Sequence-betweenSeq"></a><b>
betweenSeq(aSequence, anotherSequence)
</b>
<p>
<div class=slotDescription>
Returns a new Sequence containing the bytes between the
	occurrence of aSequence and anotherSequence in the receiver. 
	If aSequence is empty, this method is equivalent to beforeSeq(anotherSequence).
	If anotherSequence is nil, this method is equivalent to afterSeq(aSequence).
	nil is returned if no match is found.
</div>
<a name="Sequence-bitAt"></a><b>
bitAt(bitIndex)
</b>
<p>
<div class=slotDescription>
Returns a Number containing the bit at the bit index value.
</div>
<a name="Sequence-bitCount"></a><b>
bitCount
</b>
<p>
<div class=slotDescription>
Returns the number of bits in the sequence.
</div>
<a name="Sequence-bitwiseAnd"></a><b>
bitwiseAnd(aSequence)
</b>
<p>
<div class=slotDescription>
Updates the receiver to be the result of a bitwiseAnd with aSequence. Returns self.
</div>
<a name="Sequence-bitwiseNot"></a><b>
bitwiseNot(aSequence)
</b>
<p>
<div class=slotDescription>
Updates the receiver to be the result of a bitwiseNot with aSequence. Returns self.
</div>
<a name="Sequence-bitwiseOr"></a><b>
bitwiseOr(aSequence)
</b>
<p>
<div class=slotDescription>
Updates the receiver to be the result of a bitwiseOr with aSequence. Returns self.
</div>
<a name="Sequence-bitwiseXor"></a><b>
bitwiseXor(aSequence)
</b>
<p>
<div class=slotDescription>
Updates the receiver to be the result of a bitwiseXor with aSequence. Returns self.
</div>
<a name="Sequence-byteAt"></a><b>
byteAt(byteIndex)
</b>
<p>
<div class=slotDescription>
Returns a Number containing the byte at the byte index value.
</div>
<a name="Sequence-capitalize"></a><b>
capitalize
</b>
<p>
<div class=slotDescription>
First charater of the receiver is made uppercase.
</div>
<a name="Sequence-ceil"></a><b>
ceil
</b>
<p>
<div class=slotDescription>
Round each value to smallest integral value not less than x.
Returns self.
</div>
<a name="Sequence-clear"></a><b>
clear
</b>
<p>
<div class=slotDescription>
Set all values in the sequence to 0. Returns self.
</div>
<a name="Sequence-clipAfterSeq"></a><b>
clipAfterSeq(aSequence)
</b>
<p>
<div class=slotDescription>
Removes the contents of the receiver after the end of
	the first occurrence of aSequence. Returns true if anything was
	removed, or false otherwise.
</div>
<a name="Sequence-clipAfterStartOfSeq"></a><b>
clipAfterStartOfSeq(aSequence)
</b>
<p>
<div class=slotDescription>
Removes the contents of the receiver after the beginning of
	the first occurrence of aSequence. Returns true if anything was
	removed, or false otherwise.
</div>
<a name="Sequence-clipBeforeEndOfSeq"></a><b>
clipBeforeEndOfSeq(aSequence)
</b>
<p>
<div class=slotDescription>
Removes the contents of the receiver before the end of
	the first occurrence of aSequence. Returns true if anything was
	removed, or false otherwise.
</div>
<a name="Sequence-clipBeforeSeq"></a><b>
clipBeforeSeq(aSequence)
</b>
<p>
<div class=slotDescription>
Clips receiver before aSequence.
</div>
<a name="Sequence-cloneAppendPath"></a><b>
cloneAppendPath(aSequence)
</b>
<p>
<div class=slotDescription>
Appends argument to a copy the receiver such that there is one
	and only one path separator between the two and returns the result.
</div>
<a name="Sequence-contains"></a><b>
contains(aNumber)
</b>
<p>
<div class=slotDescription>
Returns true if the receiver contains an element equal in value to aNumber, false otherwise.
</div>
<a name="Sequence-containsAnyCaseSeq"></a><b>
containsAnyCaseSeq(aSequence)
</b>
<p>
<div class=slotDescription>
Returns true if the receiver contains the aSequence
	regardless of casing, false otherwise.
</div>
<a name="Sequence-containsSeq"></a><b>
containsSeq(aSequence)
</b>
<p>
<div class=slotDescription>
Returns true if the receiver contains the substring
	aSequence, false otherwise.
</div>
<a name="Sequence-convertToItemType"></a><b>
convertToItemType(aTypeName)
</b>
<p>
<div class=slotDescription>
Converts the underlying machine type for the elements, expanding or contracting
	the size of the Sequence as needed. 
	Valid names are uint8, uint16, uint32, uint64, int8, int16, int32, 
	int64, float32, and float64. Note that 64 bit types are only available 
	on platforms that support such types. Returns self.
</div>
<a name="Sequence-copy"></a><b>
copy(aSequence)
</b>
<p>
<div class=slotDescription>
Replaces the bytes of the receiver with a copy of those in aSequence. Returns self.
</div>
<a name="Sequence-cos"></a><b>
cos
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the trigonometric cosine of its value.
Returns self.
</div>
<a name="Sequence-cosh"></a><b>
cosh
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the hyperbolic cosine of its value.
Returns self.
</div>
<a name="Sequence-distanceTo"></a><b>
distanceTo(aSeq)
</b>
<p>
<div class=slotDescription>
Returns a number with the square root of the sum of the square 
	of the differences of the items between the sequences.
</div>
<a name="Sequence-dotProduct"></a><b>
dotProduct(aSeq)
</b>
<p>
<div class=slotDescription>
Returns a new Sequence containing the dot product of the receiver with aSeq.
</div>
<a name="Sequence-duplicateIndexes"></a><b>
duplicateIndexes
</b>
<p>
<div class=slotDescription>
Duplicates all indexes in the receiver.
For example, list(1,2,3) duplicateIndexes == list(1,1,2,2,3,3). Returns self.
</div>
<a name="Sequence-empty"></a><b>
empty
</b>
<p>
<div class=slotDescription>
Sets all bytes in the receiver to 0x0 and sets
	its length to 0. Returns self.
</div>
<a name="Sequence-encoding"></a><b>
encoding
</b>
<p>
<div class=slotDescription>
Returns the encoding of the elements.
</div>
<a name="Sequence-endsWithSeq"></a><b>
endsWithSeq(aSequence)
</b>
<p>
<div class=slotDescription>
Returns true if the receiver ends with aSequence, false otherwise.
</div>
<a name="Sequence-escape"></a><b>
escape
</b>
<p>
<div class=slotDescription>
Escape characters in the receiver are replaced with escape codes.
	For example a string containing a single return character would contain the
	following 2 characters after being escaped: "\n". Returns self.
</div>
<a name="Sequence-escapeRegexChars"></a><b>
escapeRegexChars
</b>
<p>
<div class=slotDescription>
Returns a clone of the receiver with all special regular expression characters
		("^", "$", etc) backslashed. Useful if you have a string that contains such characters,
		but want it to be treated as a literal string.
</div>
<a name="Sequence-exclusiveSlice"></a><b>
exclusiveSlice(inclusiveStartIndex, exclusiveEndIndex)
</b>
<p>
<div class=slotDescription>
Returns a new string containing the subset of the
	receiver from the inclusiveStartIndex to the exclusiveEndIndex. The exclusiveEndIndex argument
	is optional. If not given, it is assumed to be one beyond the end of the string.
</div>
<a name="Sequence-exp"></a><b>
exp
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to e**value.
Returns self.
</div>
<a name="Sequence-fileName"></a><b>
fileName
</b>
<p>
<div class=slotDescription>
Returns the last path component sans the path extension.
</div>
<a name="Sequence-findNthSeq"></a><b>
findNthSeq(aSequence, n)
</b>
<p>
<div class=slotDescription>
Returns a number with the nth occurrence of aSequence.
</div>
<a name="Sequence-findRegex"></a><b>
findRegex(aRegexOrString, [startIndex])
</b>
<p>
<div class=slotDescription>
Returns the first match of the given regex in the receiver, after the given start index.
		If you don't specify a start index, the search will start at the beginning of the receiver.
		The method returns nil if no match is found.
</div>
<a name="Sequence-findSeq"></a><b>
findSeq(aSequence, optionalStartIndex)
</b>
<p>
<div class=slotDescription>
Returns a number with the first occurrence of aSequence in
	the receiver after the startIndex. If no startIndex is specified,
	the search starts at index 0.
	nil is returned if no occurrences are found.
</div>
<a name="Sequence-findSeqs"></a><b>
findSeqs(listOfSequences, optionalStartIndex)
</b>
<p>
<div class=slotDescription>
Returns an object with two slots - an \"index\" slot which contains 
	the first occurrence of any of the sequences in listOfSequences found 
	in the receiver after the startIndex, and a \"match\" slot, which 
	contains a reference to the matching sequence from listOfSequences. 
	If no startIndex is specified, the search starts at index 0. 
	nil is returned if no occurrences are found.
</div>
<a name="Sequence-floor"></a><b>
floor
</b>
<p>
<div class=slotDescription>
Round each value to largest integral value not greater than x.
Returns self.
</div>
<a name="Sequence-foreach"></a><b>
foreach(optionalIndex, value, message)
</b>
<p>
<div class=slotDescription>
For each element, set index to the index of the
element and value to the element value and execute message. 
Example:
<pre>	
aSequence foreach(i, v, writeln("value at index ", i, " is ", v))
aSequence foreach(v, writeln("value ", v))
</pre>
</div>
<a name="Sequence-fromBase"></a><b>
fromBase(aNumber)
</b>
<p>
<div class=slotDescription>
Returns a number with a base 10 representation of the receiver
	converted from the specified base. Only base 2 through 32 are currently supported.
</div>
<a name="Sequence-fromBase64"></a><b>
fromBase64
</b>
<p>
<div class=slotDescription>
Returns an immutable, base64 decoded (according to RFC 1421) version of self.
</div>
<a name="Sequence-greaterThan"></a><b>
greaterThan(aSeq)
</b>
<p>
<div class=slotDescription>
Returns true if the receiver is greater than aSeq, false otherwise.
</div>
<a name="Sequence-greaterThanOrEqualTo"></a><b>
greaterThanOrEqualTo(aSeq)
</b>
<p>
<div class=slotDescription>
Returns true if the receiver is greater than or equal to aSeq, false otherwise.
</div>
<a name="Sequence-hasMatchOfRegex"></a><b>
hasMatchOfRegex(aRegexOrString)
</b>
<p>
<div class=slotDescription>
Returns true if the string contains one or more matches of the given regex.
</div>
<a name="Sequence-hash"></a><b>
hash
</b>
<p>
<div class=slotDescription>
Returns a Number containing a hash of the Sequence.
</div>
<a name="Sequence-inclusiveSlice"></a><b>
inclusiveSlice(inclusiveStartIndex, inclusiveEndIndex)
</b>
<p>
<div class=slotDescription>
Returns a new string containing the subset of the
	receiver from the inclusiveStartIndex to the inclusiveEndIndex. The inclusiveEndIndex argument
	is optional. If not given, it is assumed to be the end of the string.
</div>
<a name="Sequence-interpolate"></a><b>
interpolate(ctx)
</b>
<p>
<div class=slotDescription>
Returns immutable copy of self with interpolateInPlace(ctx) passed to the copy.
</div>
<a name="Sequence-interpolateInPlace"></a><b>
interpolateInPlace(optionalContext)
</b>
<p>
<div class=slotDescription>
Replaces all #{expression} with expression evaluated in the optionalContext. 
	If optionalContext not given, the current context is used.  Returns self.
</div>
<a name="Sequence-isEmpty"></a><b>
isEmpty
</b>
<p>
<div class=slotDescription>
Returns true if the size of the receiver is 0, false otherwise.
</div>
<a name="Sequence-isEqualAnyCase"></a><b>
isEqualAnyCase(aSequence)
</b>
<p>
<div class=slotDescription>
Returns true if aSequence is equal to the receiver
	ignoring case differences, false otherwise.
</div>
<a name="Sequence-isLowercase"></a><b>
isLowercase
</b>
<p>
<div class=slotDescription>
Returns self if all the characters in the string are lower case.
</div>
<a name="Sequence-isMutable"></a><b>
isMutable
</b>
<p>
<div class=slotDescription>
Returns true if the receiver is a mutable Sequence or false otherwise.
</div>
<a name="Sequence-isSymbol"></a><b>
isSymbol
</b>
<p>
<div class=slotDescription>
Returns true if the receiver is a
	immutable Sequence (aka, a Symbol) or false otherwise.
</div>
<a name="Sequence-isUppercase"></a><b>
isUppercase
</b>
<p>
<div class=slotDescription>
Returns self if all the characters in the string are upper case.
</div>
<a name="Sequence-isZero"></a><b>
isZero
</b>
<p>
<div class=slotDescription>
Returns true if all elements are 0, false otherwise.
</div>
<a name="Sequence-itemCopy"></a><b>
itemCopy
</b>
<p>
<div class=slotDescription>
Returns a new sequence containing the items from the receiver.
</div>
<a name="Sequence-itemSize"></a><b>
itemSize
</b>
<p>
<div class=slotDescription>
Returns number of bytes in each element.
</div>
<a name="Sequence-itemType"></a><b>
itemType
</b>
<p>
<div class=slotDescription>
Returns machine type of elements.
</div>
<a name="Sequence-justSerialized"></a><b>
justSerialized(stream)
</b>
<p>
<div class=slotDescription>
Writes the receiver's code into the stream.
</div>
<a name="Sequence-lastPathComponent"></a><b>
lastPathComponent
</b>
<p>
<div class=slotDescription>
Returns a string containing the receiver clipped up
	to the last path separator.
</div>
<a name="Sequence-lessThan"></a><b>
lessThan(aSeq)
</b>
<p>
<div class=slotDescription>
Returns true if the receiver is less than aSeq, false otherwise.
</div>
<a name="Sequence-lessThanOrEqualTo"></a><b>
lessThanOrEqualTo(aSeq)
</b>
<p>
<div class=slotDescription>
Returns true if the receiver is less than or equal to aSeq, false otherwise.
</div>
<a name="Sequence-linePrint"></a><b>
linePrint
</b>
<p>
<div class=slotDescription>
Prints the Sequence and a newline character.
</div>
<a name="Sequence-log"></a><b>
log
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the natural log of its value.
Returns self.
</div>
<a name="Sequence-log10"></a><b>
log10
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the base 10 log of its value.
Returns self.
</div>
<a name="Sequence-logicalAnd"></a><b>
logicalAnd(aSequence)
</b>
<p>
<div class=slotDescription>
Updates the receiver's values to be the result of a logical OR operations with the values of aSequence. Returns self.
</div>
<a name="Sequence-logicalOr"></a><b>
logicalOr(aSequence)
</b>
<p>
<div class=slotDescription>
Updates the receiver's values to be the result of a logical OR operations with the values of aSequence. Returns self.
</div>
<a name="Sequence-lowercase"></a><b>
lowercase
</b>
<p>
<div class=slotDescription>
Makes all the uppercase characters in the receiver lowercase. Returns self.
</div>
<a name="Sequence-lstrip"></a><b>
lstrip(aSequence)
</b>
<p>
<div class=slotDescription>
Strips the characters in aSequence
stripped from the beginning of the receiver. Example:
<p>
<pre>	
"Keep the tail" lstrip(" eKp")
==> "the tail"
</pre>
</div>
<a name="Sequence-makeFirstCharacterLowercase"></a><b>
makeFirstCharacterLowercase
</b>
<p>
<div class=slotDescription>
Receiver must be mutable (see also asMutable). Returns receiver.
  <br/>
  <pre>
  Io> "ABC" asMutable makeFirstCharacterLowercase
  ==> aBC
  </pre>
</div>
<a name="Sequence-makeFirstCharacterUppercase"></a><b>
makeFirstCharacterUppercase
</b>
<p>
<div class=slotDescription>
Receiver must be mutable (see also asMutable). Returns receiver.
  <br/>
  <pre>
  Io> "abc" asMutable makeFirstCharacterUppercase
  ==> Abc
  </pre>
</div>
<a name="Sequence-matchesOfRegex"></a><b>
matchesOfRegex(aRegexOrString)
</b>
<p>
<div class=slotDescription>
Returns a RegexMatches object that enumerates all matches of the given regex in the receiver.
</div>
<a name="Sequence-matchesRegex"></a><b>
matchesRegex(aRegexOrString)
</b>
<p>
<div class=slotDescription>
Returns true if the receiver matches the given regex, false if not.
</div>
<a name="Sequence-max"></a><b>
max
</b>
<p>
<div class=slotDescription>
Returns the maximum value of the Sequence.
</div>
<a name="Sequence-mean"></a><b>
mean
</b>
<p>
<div class=slotDescription>
Returns the arithmetic mean of the sequence.
</div>
<a name="Sequence-meanSquare"></a><b>
meanSquare
</b>
<p>
<div class=slotDescription>
Returns the arithmetic mean of the sequence's values after they have been squared.
</div>
<a name="Sequence-min"></a><b>
min
</b>
<p>
<div class=slotDescription>
Returns the minimum value of the Sequence.
</div>
<a name="Sequence-negate"></a><b>
negate
</b>
<p>
<div class=slotDescription>
Negates the values of the receiver.
Returns self.
</div>
<a name="Sequence-normalize"></a><b>
normalize
</b>
<p>
<div class=slotDescription>
Divides each value of the Sequence by the max value of the sequence.
Returns self.
</div>
<a name="Sequence-occurrencesOfSeq"></a><b>
occurrencesOfSeq(aSeq)
</b>
<p>
<div class=slotDescription>
Returns count of aSeq in the receiver.
</div>
<a name="Sequence-pack"></a><b>
pack(format, value1, ...)
</b>
<p>
<div class=slotDescription>
Returns a new Sequence with the values packed in.

	Codes:
	
	*: (one at the beginning of the format string) declare format string as BigEndian
	B: unsigned byte
	b: byte
	C: unsigned char
	c: char
	H: unsigned short
	h: short
	I: unsigned int
	i: int
	L: unsigned long
	l: long
	f: float
	F: double
	s: string

	A '*' at the begging of the format string indicates native types are to be treated as Big Endiand.
	
	A number preceding a code declares an array of that type.
	
	In the case of 's', the preceding number indicates the size of the string to be packed.
	If the string passed is shorter than size, 0 padding will be used to fill to size. If the
	string passed is longer than size, only size chars will be packed.
	
	The difference between b/B and c/C is in the values passed to pack. For b/B pack expects a number.
	For c/C pack expects a one-char-string (this is the same as '1s' or 's')
	
	Examples:
	
	s := Sequence pack("IC5s", 100, "a", "hello")
	s := Sequence pack("5c", "h", "e", "l", "l", "o")
	s := Sequence pack("I", 0x01020304)
	s := Sequence pack("*I", 0x01020304)
</div>
<a name="Sequence-pathComponent"></a><b>
pathComponent
</b>
<p>
<div class=slotDescription>
Returns a slice of the receiver before the last path separator as a symbol.
</div>
<a name="Sequence-pathExtension"></a><b>
pathExtension
</b>
<p>
<div class=slotDescription>
Returns a string containing the receiver clipped up to the last period.
</div>
<a name="Sequence-percentDecoded"></a><b>
percentDecoded
</b>
<p>
<div class=slotDescription>
Returns percent decoded version of receiver.
</div>
<a name="Sequence-percentEncoded"></a><b>
percentEncoded
</b>
<p>
<div class=slotDescription>
Returns percent encoded version of receiver.
</div>
<a name="Sequence-preallocateToSize"></a><b>
preallocateToSize(aNumber)
</b>
<p>
<div class=slotDescription>
If needed, resize the memory alloced for the receivers
	byte array to be large enough to fit the number of bytes specified by
	aNumber. This is useful for pio_reallocating the memory so it doesn't
	keep getting allocated as the Sequence is appended to. This operation
	will not change the Sequence's length or contents. Returns self.
</div>
<a name="Sequence-prependSeq"></a><b>
prependSeq(object1, object2, ...)
</b>
<p>
<div class=slotDescription>
Prepends given objects asString in reverse order to the receiver.  Returns self.")
</div>
<a name="Sequence-print"></a><b>
print
</b>
<p>
<div class=slotDescription>
Prints contents of a sequence.
</div>
<a name="Sequence-product"></a><b>
product
</b>
<p>
<div class=slotDescription>
Returns the product of all the sequence's values multipled together.
</div>
<a name="Sequence-rangeFill"></a><b>
rangeFill
</b>
<p>
<div class=slotDescription>
Sets the values of the Sequence to their index values.
Returns self.
</div>
<a name="Sequence-removeAt"></a><b>
removeAt(index)
</b>
<p>
<div class=slotDescription>
Removes the item at index. Returns self.
</div>
<a name="Sequence-removeEvenIndexes"></a><b>
removeEvenIndexes
</b>
<p>
<div class=slotDescription>
Removes even indexes in the receiver.
For example, list(1,2,3) removeEvenIndexes == list(1, 3). Returns self.
</div>
<a name="Sequence-removeLast"></a><b>
removeLast
</b>
<p>
<div class=slotDescription>
Removes the last element from the receiver. Returns self.
</div>
<a name="Sequence-removeOddIndexes"></a><b>
removeOddIndexes
</b>
<p>
<div class=slotDescription>
Removes odd indexes in the receiver.
For example, list(1,2,3) removeOddIndexes == list(2). Returns self.
</div>
<a name="Sequence-removePrefix"></a><b>
removePrefix(aSequence)
</b>
<p>
<div class=slotDescription>
If the receiver begins with aSequence, it is removed. Returns self.
</div>
<a name="Sequence-removeSeq"></a><b>
removeSeq(aSequence)
</b>
<p>
<div class=slotDescription>
Removes occurrences of aSequence from the receiver.
</div>
<a name="Sequence-removeSlice"></a><b>
removeSlice(startIndex, endIndex)
</b>
<p>
<div class=slotDescription>
Removes the items from startIndex to endIndex.
	Returns self.
</div>
<a name="Sequence-removeSuffix"></a><b>
removeSuffix(aSequence)
</b>
<p>
<div class=slotDescription>
If the receiver end with aSequence, it is removed. Returns self.
</div>
<a name="Sequence-repeated"></a><b>
repeated(n)
</b>
<p>
<div class=slotDescription>
Returns a new sequence containing the receiver repeated n number of times.
</div>
<a name="Sequence-replaceFirstSeq"></a><b>
replaceFirstSeq(aSequence, anotherSequence, optionalStartIndex)
</b>
<p>
<div class=slotDescription>
Returns a new Sequence with the first occurrence of aSequence
	replaced with anotherSequence in the receiver. If optionalStartIndex is
	provided, the search for aSequence begins at that index. Returns self.
</div>
<a name="Sequence-replaceMap"></a><b>
replaceMap(aMap)
</b>
<p>
<div class=slotDescription>
In the receiver, the keys of aMap replaced with its values. Returns self.
</div>
<a name="Sequence-replaceSeq"></a><b>
replaceSeq(aSequence, anotherSequence)
</b>
<p>
<div class=slotDescription>
Returns a new Sequence with all occurrences of aSequence
	replaced with anotherSequence in the receiver. Returns self.
</div>
<a name="Sequence-reverse"></a><b>
reverse
</b>
<p>
<div class=slotDescription>
Reverses the ordering of all the items of the receiver. Returns copy of receiver.
</div>
<a name="Sequence-reverseFindSeq"></a><b>
reverseFindSeq(aSequence, startIndex)
</b>
<p>
<div class=slotDescription>
Returns a number with the first occurrence of aSequence in
	the receiver before the startIndex. The startIndex argument is optional.
	By default reverseFind starts at the end of the string. Nil is
	returned if no occurrences are found.
</div>
<a name="Sequence-reverseInPlace"></a><b>
reverseInPlace
</b>
<p>
<div class=slotDescription>
Reverses the bytes in the receiver, in-place.
</div>
<a name="Sequence-rstrip"></a><b>
rstrip(aSequence)
</b>
<p>
<div class=slotDescription>
Strips the characters in
aSequence stripped from the end of the receiver. Example:
<pre>	
"Cut the tail off" rstrip(" afilot")
==> "Cut the"
</pre>
</div>
<a name="Sequence-set"></a><b>
set(aNumber1, aNumber2, ...)
</b>
<p>
<div class=slotDescription>
Sets the values of the receiver to the sequences of numbers in the arguments.
	Unset values will remain unchanged.
	Returns self.
</div>
<a name="Sequence-setEncoding"></a><b>
setEncoding(encodingName)
</b>
<p>
<div class=slotDescription>
Sets the encoding flag of the receiver (only the encoding flag, 
	itemSize and itemType will change, no conversion is done between UTF
	encodings - you can use convertToUTF8, etc methods for conversions). 
	Valid encodings are number, utf8, utf16, and utf32. Returns self.
</div>
<a name="Sequence-setItemType"></a><b>
setItemType(aTypeName)
</b>
<p>
<div class=slotDescription>
Sets the underlying machine type for the elements. 
	Valid names are uint8, uint16, uint32, uint64, int8, int16, int32, 
	int64, float32, and float64. Note that 64 bit types are only available 
	on platforms that support such types. Returns self.
</div>
<a name="Sequence-setItemsToDouble"></a><b>
setItemsToDouble(aNumber)
</b>
<p>
<div class=slotDescription>
Sets all items in the Sequence to the double floating point value of aNumber.
</div>
<a name="Sequence-setItemsToLong"></a><b>
setItemsToLong(aNumber)
</b>
<p>
<div class=slotDescription>
Sets all items in the Sequence to the long integer value of aNumber.
</div>
<a name="Sequence-setSize"></a><b>
setSize(aNumber)
</b>
<p>
<div class=slotDescription>
Sets the length in bytes of the receiver to aNumber. Return self.
</div>
<a name="Sequence-sin"></a><b>
sin
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the trigonometric sine of its value.
Returns self.
</div>
<a name="Sequence-sinh"></a><b>
sinh
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the hyperbolic sine of its value.
Returns self.
</div>
<a name="Sequence-size"></a><b>
size
</b>
<p>
<div class=slotDescription>
Returns the length in number of items (which may or may not
be the number of bytes, depending on the item type) of the receiver. For example:
<p>
<pre>	
"abc" size == 3
</pre>
</div>
<a name="Sequence-sizeInBytes"></a><b>
sizeInBytes
</b>
<p>
<div class=slotDescription>
Returns the length in bytes of the receiver.
</div>
<font color=#55a>
<a name="Sequence-slice"></a><b>
slice
</b>
<p>
<div class=slotDescription>
Deprecated method. Use exSlice instead.
</font>
</div>
<a name="Sequence-slicesBetween"></a><b>
slicesBetween(startSeq, endSeq)
</b>
<p>
<div class=slotDescription>
Returns a list of slices delimited 
  by <tt>startSeq</tt> and <tt>endSeq</tt>.
  <br>
  <pre>
  Io> "<a><b></b></a>" slicesBetween("<", ">")
  ==> list("a", "b", "/b", "/a")
  </pre>
</div>
<a name="Sequence-sort"></a><b>
sort
</b>
<p>
<div class=slotDescription>
Sorts the characters/numbers in the array. Returns self.
</div>
<a name="Sequence-split Returns a list containing the sub-sequences of the receiver divided by the given arguments."></a><b>
split Returns a list containing the sub-sequences of the receiver divided by the given arguments.
</b>
<p>
<div class=slotDescription>
If no arguments are given the sequence is split on white space.
</div>
<a name="Sequence-split"></a><b>
split(optionalArg1, optionalArg2, ...)
</b>
<p>
<div class=slotDescription>
Returns a list containing the sub-sequences of the receiver divided by the given arguments.
If no arguments are given the sequence is split on white space.
Examples:
<pre>	
"a b c d" split == list("a", "b", "c", "d")
"a*b*c*d" split("*") == list("a", "b", "c", "d")
"a*b|c,d" split("*", "|", ",") == list("a", "b", "c", "d")
"a   b  c d" split == list("a", "", "", "", "b", "", "", "c", "", "d")
</pre>
</div>
<a name="Sequence-splitAt"></a><b>
splitAt(indexNumber)
</b>
<p>
<div class=slotDescription>
Returns a list containing the two parts of the receiver as split at the given index.
</div>
<a name="Sequence-splitAtRegex"></a><b>
splitAtRegex(aRegexOrString)
</b>
<p>
<div class=slotDescription>
Splits the receiver into pieces using the given regex as the delimiter and
		returns the pieces as a list of strings.
</div>
<a name="Sequence-splitNoEmpties"></a><b>
splitNoEmpties(optionalArg1, optionalArg2, ...)
</b>
<p>
<div class=slotDescription>
Returns a list containing the non-empty sub-sequences of the receiver divided by the given arguments.
		If no arguments are given the sequence is split on white space.
		Examples:
		<code>
		"a   b  c d" splitNoEmpties => list("a", "b", "c", "d")
		"a***b**c*d" splitNoEmpties("*") => list("a", "b", "c", "d")
		"a***b||c,d" splitNoEmpties("*", "|", ",") => list("a", "b", "c", "d")
		</code>
</div>
<a name="Sequence-sqrt"></a><b>
sqrt
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the square root of its value.
Returns self.
</div>
<a name="Sequence-square"></a><b>
square
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the square of its value.
Returns self.
</div>
<a name="Sequence-strip"></a><b>
strip(optionalSequence)
</b>
<p>
<div class=slotDescription>
Trims the whitespace (or optionalSequence) off both ends:
<p>
<pre>	
"   Trim this string   \r\n" strip
==> "Trim this string"
</pre>
</div>
<a name="Sequence-sum"></a><b>
sum
</b>
<p>
<div class=slotDescription>
Returns the sum of the Sequence.
</div>
<a name="Sequence-tan"></a><b>
tan
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the trigonometric tangent of its value.
Returns self.
</div>
<a name="Sequence-tanh"></a><b>
tanh
</b>
<p>
<div class=slotDescription>
Sets each value of the Sequence to the hyperbolic tangent of its value.
Returns self.
</div>
<a name="Sequence-toBase"></a><b>
toBase(aNumber)
</b>
<p>
<div class=slotDescription>
Returns a Sequence containing the receiver (which is
	assumed to be a base 10 number) converted to the specified base.
	Only base 8 and 16 are currently supported.
</div>
<a name="Sequence-translate"></a><b>
translate(fromChars, toChars)
</b>
<p>
<div class=slotDescription>
In the receiver, the characters in fromChars are replaced with those in the same positions in toChars. Returns self.
</div>
<a name="Sequence-unescape"></a><b>
unescape
</b>
<p>
<div class=slotDescription>
Escape codes replaced with escape characters. Returns self.
</div>
<a name="Sequence-unpack"></a><b>
unpack(optionalStartPosition, format)
</b>
<p>
<div class=slotDescription>
Unpacks self into a list using the format passed in. See Sequence pack.
	
	Returns a List.

	Examples:

	s := Sequence pack("IC5s", 100, "a", "hello")
	l := s unpack("IC5s")

	s := Sequence pack("5c", "h", "e", "l", "l", "o")
	l := s unpack("5c")

	s := Sequence pack("I", 0x01020304)
	l := s unpack("I")

	s := Sequence pack("*I", 0x01020304)
	l := s unpack("*I")

	l := "hello" unpack("5c")
</div>
<a name="Sequence-uppercase"></a><b>
uppercase
</b>
<p>
<div class=slotDescription>
Makes all characters of the receiver uppercase.
</div>
<a name="Sequence-urlDecoded"></a><b>
urlDecoded
</b>
<p>
<div class=slotDescription>
Returns url decoded version of receiver.
</div>
<a name="Sequence-urlEncoded"></a><b>
urlEncoded
</b>
<p>
<div class=slotDescription>
Returns url encoded version of receiver.
</div>
<a name="Sequence-whiteSpaceStrings"></a><b>
whiteSpaceStrings
</b>
<p>
<div class=slotDescription>
Returns a List of strings. Each string contains a different
	whitespace character.
</div>
<a name="Sequence-with"></a><b>
with(aSequence, ...)
</b>
<p>
<div class=slotDescription>
Returns a new Sequence which is the concatenation of the arguments.
	The returned sequence will have the same mutability status as the receiver.
</div>
<a name="Sequence-withStruct"></a><b>
withStruct(memberList)
</b>
<p>
<div class=slotDescription>
This method is useful for producing a Sequence containing a raw datastructure with
the specified types and values. The memberList format is:
<p>
list(memberType1, memberName1, memberType2, memberName2, ...)
<p>
Member types include: 
<pre>
int8, int16, int32, int64
uint8, uint16, uint32, uint64
float32, float64 
</pre>
Example:
<pre>
pointStructSeq := Sequence withStruct(list("float32", 1.2, "float32", 3.5))
</pre>
The output pointStructSeq would contain 2 raw 32 bit floats.
</div>
</td>
</tr>
</table>
<br><br><br><br><br>
</body>
</html>
